package com.lingyuan.oms.service;



import com.baomidou.mybatisplus.extension.service.IService;
import com.lingyuan.oms.domain.OrderEntity;
import com.lingyuan.oms.domain.param.CreateOrderParam;
import com.lingyuan.oms.domain.param.SettleAccountsParam;
import com.lingyuan.oms.domain.request.OrderSyncRequest;
import com.lingyuan.oms.domain.response.SettleAccountsResponse;

import java.util.List;
import java.util.Map;

public interface OrderService extends IService<OrderEntity> {
    /* *
     * @Title: getRedisOrder
     * @Author: DELL
     * @Date: 2024-09-26 17:53:07
     * @Params: [selectOrderToken]
     * @Return: OrderEntity
     * @Description: 查询redis中的订单信息
     */
    OrderEntity getRedisOrder(String selectOrderToken);
    /* *
     * @Title: createOrder
     * @Author: DELL
     * @Date: 2024-09-21 11:50:25
     * @Params: [createOrderParam]
     * @Return: OrderEntity
     * @Description:  生成订单
     */
    OrderEntity createOrder(CreateOrderParam createOrderParam);

    /* *
     * @Title: settleAccounts
     * @Author: DELL
     * @Date: 2024-09-21 18:02:21
     * @Params: [settleAccountsParam]
     * @Return: SettleAccountsResponse
     * @Description: 结算
     */
    SettleAccountsResponse settleAccounts(SettleAccountsParam settleAccountsParam);

    OrderEntity findOrderId(Long orderId);


    /* *
     * @Title: payOrder
     * @Author: DELL
     * @Date: 2024-09-26 20:17:44
     * @Params: [outTradeNo, alipayTradeNo, params]
     * @Return: void
     * @Description: 支付宝回调
     */
    void payOrder(String outTradeNo, String alipayTradeNo, Map<String, String> params);


    /* *
     * @Title: syncRedisOrder
     * @Author: DELL
     * @Date: 2024-09-26 20:17:33
     * @Params: [orderSn]
     * @Return: void
     * @Description: 同步redis中的订单信息
     */
    void syncRedisOrder(String orderSn);
    /* *
     * @Title: queryOrderBatchAdd
     * @Author: DELL
     * @Date: 2024-10-06 09:56:32
     * @Params: [userReqs]
     * @Return: Boolean
     * @Description: 批量添加订单
     */
    Boolean queryOrderBatchAdd(List<OrderSyncRequest> userReqs);
}
